/**
 * 
 */
package com.base.myproject.client.busi.b2c;

import java.io.Serializable;

/**
 * @author zgw
 *2009-8-18 下午03:07:01
 * javazgw@gmail.com
 */
public class CcodeObject implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	String ccode;
	String cname;
	String email;
	String password;
	String loginname;
	String phone;
	String addr;

	public CcodeObject()
	{
	//	this.ccode = ccode;
	}
	public CcodeObject(String ccode)
	{
		this();
		this.ccode = ccode;
		
	}

	/**
	 * @return the ccode
	 */
	public String getCcode() {
		return ccode;
	}

	/**
	 * @param ccode the ccode to set
	 */
	public void setCcode(String ccode) {
		this.ccode = ccode;
	}

	/**
	 * @return the cname
	 */
	public String getCname() {
		return cname;
	}

	/**
	 * @param cname the cname to set
	 */
	public void setCname(String cname) {
		this.cname = cname;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the loginname
	 */
	public String getLoginname() {
		return loginname;
	}

	/**
	 * @param loginname the loginname to set
	 */
	public void setLoginname(String loginname) {
		this.loginname = loginname;
	}
	
	/**
	 * @return the phone
	 */
	public String getPhone() {
		return phone;
	}
	/**
	 * @param phone the phone to set
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}
	/**
	 * @return the addr
	 */
	public String getAddr() {
		return addr;
	}
	/**
	 * @param addr the addr to set
	 */
	public void setAddr(String addr) {
		this.addr = addr;
	}
	public String getSaveSql()
	{

		String str = "";
		str ="update ccode set";
		str +=" cname='"+getCname()+"',";
		str +=" email='"+getEmail()+"',";
		str +=" loginname='"+getLoginname()+"',";
		str +=" phone='"+getPhone()+"',";
		str +=" addr='"+getAddr()+"',";
		str +=" password='"+getPassword()+"'";
		str +=" where ccode ='"+ccode+"'";
		
		//str +="update ccode (cname,email,loginname,password) values('"+getCname()+"','"+getEmail()+"','"+getLoginname()+"','"+getPassword()+"') where ccode ='"+ccode+"'";
		return str;
	}
	
	public String getADDSql()
	{
		String str = "";
		str ="insert into ccode (ccode,cname,email,loginname,phone,addr,password) values('"+getCcode()+"','"+getCname()+"','"+getEmail()+"','"+getLoginname()+"','"+getPhone()+"','"+getAddr()+"','"+getPassword()+"')";
		
		return str;
	}


	
}
